/*
 * @Description:
 * @Autor: 刘诗文
 * @Date: 2020-11-10 09:44:23
 * @LastEditors: 刘诗文
 * @LastEditTime: 2021-02-03 13:58:33
 */
/**
 * 新车提醒
 *
 * @Author: 刘国强
 * @Date: 2019/8/27
 */
import axios from '@/api/fetch';
import * as types from './types';
import SERVER from '@/api/server';

// 查询首保提醒
export const queryVehicleRemind = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/remind/findAll`, { params });

// 保存首保提醒
export const saveVehicleRemind = params => axios.post(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/remind/save`, params);

// 导出首保提醒
export const exportVehicleRemind = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/remind/firstServiceReminderExport`, { params, responseType: 'blob' });

// 导出保险到期提醒
export const expirationOfInsuranceExcal = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/remind/expirationOfInsuranceExcal`, { params, responseType: 'blob' });

// 导出定期保养提醒
export const regularMaintenanceReminder = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/remind/regularMaintenanceReminder`, { params, responseType: 'blob' });

// 导出生日提醒
export const birthdayReminderExcel = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/remind/birthdayReminderExcel`, { params, responseType: 'blob' });

// 查询提醒记录
export const getRemindRecord = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/remind/getRemindHistory`, { params });

// 查询所有提醒历史记录
export const getRemindHistorys = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/newVehicleRemind/getRemindHistorys/${params.vin}/${params.ownerNo}`);
// 查询当前回访历史
export const getInfoHistory = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/cust/interface/getInfoHistoy/${params.vin}/${params.ownerNo}/${params.visitType}`, { params });
